<div class="panel panel-default" ng-controller="BusShiftInsertCtrl">
	<div class="panel-heading">
		跨城巴士 / 班次档案 / 生成发班计划
		<span style="float: right;margin-top: -7px;height: 0px">
			<button type="submit" class="btn m-b-xs w-xs btn-info"  ui-sref="app.bus.shiftTemplate()">返回</button>
		</span>
	</div>
	<toaster-container toaster-options="{'position-class': 'toast-top-right', 'close-button':true}"></toaster-container>
	<div class="row wrapper m-n">
		<form class="bs-example form-horizontal ng-pristine ng-valid">
			<div class="form-group col-md-3">
				<div class="col-md-11">
					<input type="text" ng-model="queryMap.batchNo" class="form-control" placeholder="批次号">
				</div>
			</div>
			<div class="form-group col-md-3">
				<div class="col-md-11">
					<input type="text" ng-model="queryMap.shiftNo" class="form-control" placeholder="班次号">
				</div>
			</div>
			<div class="form-group col-md-3">
				<div class="col-md-11">
					<div class="input-group">
						<ui-select ng-model="routeList.selected" theme="bootstrap">
							<ui-select-match placeholder="线路">{{$select.selected.name}}</ui-select-match>
							<ui-select-choices repeat="route in routeList | propsFilter: {name: $select.search}">
								<span ng-bind-html=" route.name| highlight: $select.search"></span>
							</ui-select-choices>
						</ui-select>
						<span class="input-group-btn">
							<button ng-click="routeList.selected = undefined"
								class="btn btn-default">
								<span class="glyphicon glyphicon-trash"></span>
						</button>
						</span>
					</div>
				</div>
			</div>
			
			<div class="form-group col-md-3" >
				<div class="col-md-4">
					   <button type="button" class="btn btn-info" ng-click="query()">查询</button>
			    </div>	
			    <div class="col-md-4"  has-authority="BUS_SHIFT_TEMPLATE_ADD_SHIFT">	   
					 <button type="button" class="btn btn-info" ng-click="insert()">确认发班</button>	
				</div>
			</div>				
		</form>
	</div>
	<p style="margin-left: 20px;color: red" >说明：勾选要发班的班次档案，点击列表右侧的“确认发班”按钮进行发班。（支持翻页多个勾选）</p>
	<div class="table-responsive">
		<table class="table table-striped b-t b-light">
			<thead>
				<tr>
					<th style="width: 10px;"><label class="i-checks m-b-none" >
							<input type="checkbox"  ng-model="ckAll"
							ng-click="checkAll(ckAll,dataList)"><i></i>
					</label></th>
					<th style="width:70px;">批次号</th>
					<th style="width:70px;">班次号</th>
					<th style="width:80px;">状态</th>
					<th style="width:100px;">线路名</th>
					<th style="width:80px;">开班时间</th>
					<th style="width:80px;">收班时间</th>
					<th style="width:80px;">车票数</th>
<!-- 					<th style="width:100px;">
					<div class="row list-icon">
						<a href tooltip="确认发班" >
							<i class="fa fa-plus fa-fw" ng-click="insert()"></i>
						</a>
					 </div>
					</th> -->
				</tr>
			</thead>
			<tbody>
				<tr ng-repeat="tpl in dataList">
					<td><label class="i-checks m-b-none" > <input
							id="{{tpl.ic}}" name="checks" type="checkbox" ng-checked="ckAll"
							ng-model="checks" ng-click="check(tpl.id,checks)" value="{{tpl.id}}"><i></i>
					</label></td>
					<td>{{tpl.batchNo}}</td>
					<td>{{tpl.shiftNo}}</td>
					<td>
					   <span ng-if="tpl.status==1">正常</span>
					   <span ng-if="tpl.status==2">暂停</span>
					   <span ng-if="tpl.status==3">停用</span>
					</td>
					<td>{{tpl.route.name}}</td>
					<td>{{tpl.startTime| date : ' HH:mm:ss'}}</td>
					<td>{{tpl.endTime| date : 'HH:mm:ss'}}</td>
					<td>{{tpl.tickets}}张</td>
<!-- 					<td></td> -->
				</tr>
				<tr ng-show="dataList==''">
					<td colspan="13" style="text-align: center;">暂无班次档案信息</td>
				</tr>
			</tbody>
		</table>
	</div>
	<page-footer/>
</div>